import java.util.Scanner;

public class Text2 {
    //素数
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入一个数字:");
        int n = scan.nextInt();
        int i = 2;
        for (; i <= Math.sqrt(n); i++) {
            if(n % i == 0) {
                System.out.println("不是素数");
                break;
            }
        }
        if( i > Math.sqrt(n)) {
            System.out.println("是素数");
        }
    }
}
